package cn.yshujia.domain.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * @author YShuJia
 * @create 2024/11/30
 * @description ClassifyEnum
 */

@Getter
public enum ClassifyEnum implements IEnum<Integer> {
	
	RESOURCES(11, "系统资源"),
	
	ARTICLE(21, "博客文章"),
	
	DEPLOY(22, "部署文章"),
	
	DIARY(23, "随笔随记"),
	
	FRIEND(31, "友情链接"),
	
	ALBUM(41, "一刻相册");
	
	
	@EnumValue
	private final Integer type;
	
	@JsonValue
	private final String message;
	
	@JsonCreator
	ClassifyEnum(Integer type, String message) {
		this.type = type;
		this.message = message;
	}
	
	@Override
	public Integer getValue() {
		return type;
	}
}
